package shouji;

/**
 * @author zihao
 * @date 2025/3/17 22:58
 * @VERSION
 * @description
 **/
public class Phone {
    private String type="xiaomi";
    private int price=2333;
    private String brand="15ultra";
    //空参构造
    public Phone(){
    }
    //有参构造
    public Phone(String type,int price,String brand){
        this.type=type;
        this.brand=brand;
        this.price=price;
    }
    //使用getter
    public String getType(){
        return type;
    }
    //使用setter
    public void setType(String type){
        this.type=type;
    }
    //使用getter
    public String getBrand(){
        return brand;
    }
    //使用setter
    public void setBrand(String brand){
        this.brand=brand;
    }
    //使用getter
    public int getPrice(){
        return price;
    }
    //使用setter
    public void setPrice(int price){
        this.price=price;
    }
    public void play(){
        System.out.println("手机型号是"+type+"品牌是"+brand+"价格是"+price);
    }


}
